package coop.tecso.test.objets.complex;

//src/gen
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 *
 */
@Entity
@Table(name = "COUPON_FLOWN_MTK")
public class CouponFlownMtk implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "COUPON_FLOWN_MTK_SEQ")
	@SequenceGenerator(name = "COUPON_FLOWN_MTK_SEQ", sequenceName = "COUPON_FLOWN_MTK_SEQ", allocationSize = 1)
	@Column(name = "COUPON_FLOWN_MTK_ID", nullable = false)
	private int id;
	@Version
	@Column(name = "VERSION")
	private int couponFlownMtkversion;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "PAX_QUANTITY", nullable = false, length = 4)
	private int paxQuantity;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_USER", length = 255)
	private String tecCreationUser;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_TIMESTAMP")
	private java.sql.Timestamp tecCreationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_TIMESTAMP")
	private java.sql.Timestamp tecModificationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_USER", length = 255)
	private String tecModificationUser;

	/**
	 *
	 */
	@Column(name = "TEC_DELETED")
	private Boolean tecDeleted;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlown.class, optional = false, fetch = FetchType.LAZY)
	@JoinColumns({@JoinColumn(name = "COUPON_FLOWN_FK",referencedColumnName = "COUPON_FLOWN_ID",nullable = false)
	})
	private CouponFlown couponFlown;

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponFlownMtkPax.class, mappedBy = "couponFlownMtk", fetch = FetchType.LAZY)
	private java.util.Set<CouponFlownMtkPax> couponFlownMtkPax = new java.util.HashSet<CouponFlownMtkPax>();

	public CouponFlownMtk() {
	}

	// Constructor for primary key
	public CouponFlownMtk(int id) {
		this.id = id;
	}

	/**
	 * Autogenerated key
	 */
	public int getId() {
		return id;
	}

	public int getCouponFlownMtkversion() {
		return couponFlownMtkversion;
	}

	public void setCouponFlownMtkversion(int couponFlownMtkversion) {
		this.couponFlownMtkversion = couponFlownMtkversion;
	}

	public int getPaxQuantity() {
		return paxQuantity;
	}

	public void setPaxQuantity(int paxQuantity) {
		this.paxQuantity = paxQuantity;
	}

	public String getTecCreationUser() {
		return tecCreationUser;
	}

	public void setTecCreationUser(String tecCreationUser) {
		this.tecCreationUser = tecCreationUser;
	}

	public java.sql.Timestamp getTecCreationTimestamp() {
		return tecCreationTimestamp;
	}

	public void setTecCreationTimestamp(java.sql.Timestamp tecCreationTimestamp) {
		this.tecCreationTimestamp = tecCreationTimestamp;
	}

	public java.sql.Timestamp getTecModificationTimestamp() {
		return tecModificationTimestamp;
	}

	public void setTecModificationTimestamp(
			java.sql.Timestamp tecModificationTimestamp) {
		this.tecModificationTimestamp = tecModificationTimestamp;
	}

	public String getTecModificationUser() {
		return tecModificationUser;
	}

	public void setTecModificationUser(String tecModificationUser) {
		this.tecModificationUser = tecModificationUser;
	}

	public Boolean getTecDeleted() {
		return tecDeleted;
	}

	public void setTecDeleted(Boolean tecDeleted) {
		this.tecDeleted = tecDeleted;
	}

	public CouponFlown getCouponFlown() {
		return couponFlown;
	}

	public void setCouponFlown(
CouponFlown couponFlown) {
		this.couponFlown = couponFlown;
	}

	public java.util.Set<CouponFlownMtkPax> getCouponFlownMtkPax() {
		return couponFlownMtkPax;
	}

	public void setCouponFlownMtkPax(
java.util.Set<CouponFlownMtkPax> couponFlownMtkPax) {
		this.couponFlownMtkPax = couponFlownMtkPax;
	}

	public void addCouponFlownMtkPax(
CouponFlownMtkPax couponFlownMtkPax) {
		this.couponFlownMtkPax.add(couponFlownMtkPax);
	}

	public void removeCouponFlownMtkPax(
CouponFlownMtkPax couponFlownMtkPax) {
		this.couponFlownMtkPax.remove(couponFlownMtkPax);
	}
}
